<?php 
	$id = $_GET['id']; 

	$sql="select id_peserta, foto,nama, tempat_lahir, tgl_lahir, p.id_jenis_peserta from peserta p inner join penduduk pn on p.id_penduduk = pn.id_penduduk inner join jenis_peserta j on p.id_jenis_peserta = j.id_jenis_peserta where p.id_peserta='$id'";
	$qry=mysql_query($sql);
	$hasil = mysql_fetch_array($qry);
	$url_foto='foto_peserta/'.$hasil['foto'];
?>
<div id=tiga_ba>
	<div id=tiga_baa>Ubah Data Peserta</div>
	<div id=tiga_bab></div>
	<div class=clear></div>
</div>
            
<form action="utama.php?module=mod_peserta&act=update" onsubmit="return gsValidate('jenis','Jenis Peserta Harus Dipilih','required');" method="post" enctype="multipart/form-data">
	<table style="margin: 10px 15px 10px 15px;">
		<tr>
			<td>ID Peserta</td>
			<td width="300">
				<input name="id" type="text" id="id" value="<? echo $hasil['id_peserta']; ?>" class="input2" disabled/>
				<input name="kode" type="hidden" id="kode" value="<? echo $hasil['id_peserta']; ?>" class="input2"/>
			</td>
		</tr>
		<tr>
			<td>Nama</td>
			<td width="300">
				<input name="nama" type="text" id="nama" value="<? echo $hasil['nama']; ?>" class="input2" disabled/>
			</td>
		</tr>
		<tr>
			<td>Tempat Lahir</td>
			<td width="300">
				<input name="tempat_lahir" type="text" id="tempat_lahir" value="<? echo $hasil['tempat_lahir']; ?>" class="input2" disabled/>
			</td>
		</tr>
		<tr>
			<td>Tanggal Lahir</td>
			<td width="300">
				<input name="tgl_lahir" type="text" id="tgl_lahir" value="<? echo tgl_ind1("$hasil[tgl_lahir]"); ?>" class="input2" disabled/>
			</td>
		</tr>
		<tr>
			<td>Jenis Peserta</td>
			<td width="300">
				<?php echo edit_kombo("jenis","jenis_peserta","$hasil[id_jenis_peserta]","input2"); ?>
			</td>
		</tr>
		<tr>
		  <td>Foto</td>
		  <td><img src="<?php echo $url_foto;?>" width="150"/></td>
	  </tr>
		<tr>
			<td>&nbsp;</td>
			<td><input name="submit" type="submit" class="button" value="Ubah" /></td>
		</tr>
	</table>                
</form>		
            
        